package com.juyu.miliao.api.dao.mysql;

import com.juyu.miliao.api.domain.QuestionAndAnswerPayInfo;
import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.Map;

/**
 * 用户问答购买信息Dao
 *
 * @author xuanqicheng
 * @create 2018-19-1:23 PM
 */
@Repository
public class QuestionAndAnswerPayInfoDao {

    @Autowired
    private SqlSession sqlSession;

    public QuestionAndAnswerPayInfo selectInfoByQuestionIdAndUserId(Map<String, Object> parameMap) {
        return sqlSession.selectOne("selectInfoByQuestionIdAndUserId",parameMap);
    }

    public void createInfo(QuestionAndAnswerPayInfo payInfo) {

        sqlSession.insert("add",payInfo);
    }
}
